kopirovani adresare
Otázka od: Matejcek Petr
30. 11. 2003 20:09
zdravim,
jakou funkci pouzit pro zkopirovani celeho adresare rekneme
\\server\zaloha vcetne podadresaru a souboru do adresare c:\zaloha
je na to neco ??
diky PM
Odpovedá: Jan Harman
30. 11. 2003 20:32
Ja pouzivam toto:
Function CopyDirectory (sour, dest: String; move: Boolean): Boolean;
var
FileOp: TSHFileOpStruct;
begin
Result := true;
ZeroMemory(@FileOp, Sizeof(FileOp));
with FileOp do
begin
Wnd := Application.MainForm.Handle;
if move then wFunc := FO_MOVE
else wFunc := FO_COPY;
pFrom := PChar(Sour+#0#0);
pTo := PChar(Dest+#0#0);
fFlags := FOF_NOCONFIRMATION + FOF_ALLOWUNDO;
end;
if (SHFileOperation(FileOp) <> 0) or (FileOp.fAnyOperationsAborted) then
Result := false;
end;
Honza
----- Original Message -----
From: "Matejcek Petr" <konference@crhov.komfi.cz>
To: <delphi-l@clexpert.cz>
Sent: Sunday, November 30, 2003 8:02 PM
Subject: kopirovani adresare
> zdravim,
>
> jakou funkci pouzit pro zkopirovani celeho adresare rekneme
> \\server\zaloha vcetne podadresaru a souboru do adresare c:\zaloha
>
> je na to neco ??
>
> diky PM
>
>
>
>